import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from "rxjs/Observable";


@Injectable()
export class SettingProvider {

    constructor(public http: HttpClient) {
    }

    //保存昵称名称
    saveNickName(param): Observable<any> {
        return this.http.post('/agent/v1/nickName', param, {responseType: "text"});
    }

    saveHeadPic(headPic): Observable<any> {
        return this.http.post('/agent/v1/headPic', {headPic: headPic}, {responseType: "text"});
    }

    getNickNameAndHeadInfo(): Observable<any> {
        return this.http.get('/agent/v1/nickAndHeadInfo');
    }
}
